#include <stdio.h>
//#include "mm_public.h"
#include "mm_public.c"

int main(int argc, char **argv) {

	mm_t MM;
	void *chunk1 = NULL;
	void *chunk2 = NULL;
	void *chunk3 = NULL;
	void *chunk4 = NULL;
	void *chunk5 = NULL;
	int mem_size = 20;
	mm_init(&MM, mem_size);
	printf("MM has size %d\n", MM.size);
	node *temp;
	temp = MM.head;
	int i = 0;
	/*while (i < mem_size) {
	printf("Flags are set to %d\n", temp->flag);
	temp = temp->next;
	i++;
	}*/

	chunk1 = mm_get(&MM, 6);
	chunk2 = mm_get(&MM, 7);
	chunk3 = mm_get(&MM, 10);
	chunk4 = mm_get(&MM, 2);
	mm_put(&MM, chunk2);
	chunk5 = mm_get(&MM, 4); 

	int j = 0;
	temp = MM.head;
	while (j < mem_size) {
		printf("This is node %d and flag is set to %d\n", temp->nodeid, temp->flag);
		temp = temp->next;
		j++;
	}

}
